#ifndef SOCKETMANAGER_H
#define SOCKETMANAGER_H

#include <QObject>
#include <QtNetwork>

class socketmanager : public QObject
{
    Q_OBJECT
public:
    socketmanager();
    static socketmanager *GetInstance();
    void socket_init();
    void udpSocket_port_bind(int port);
    void tcpSocket_port_bind(int port);
    QUdpSocket* get_udpSocket();
    QTcpSocket* get_tcpSocket();

public:
    QUdpSocket *udpSocket;
    QTcpSocket *tcpSocket;
    quint32 udp_port,tcp_port; //绑定端口号
    QString tcp_send_info;
    QString udpPort,tcpPort;   //配置文件获取端口号
};

#endif // SOCKETMANAGER_H
